<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/include/tagLib.jsp" %>
<!doctype html>
<html lang="en">
<head>
    <title>${sieName}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <%@include file="/include/cssLib.jsp" %>
</head>

<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <!-- 菜单 -->
            <tag:nav key="searchOptimize"/>

            <div class="tab-content">
                <div class="tab-pane active">
                    <div class="card">
                        <div class="card-header">
                            <div class="row">
                                <form id="searchForm" action="${ctx}/adminConsole/searchOptimize/elevateList" method="post">
                                    <div class="col-md-1">
                                        <select name="QF__EQ__createBy" class="selectpicker" data-style="select-with-transition" data-live-search="true">
                                            <option value="">优化人</option>
                                            <c:forEach items="${fns:getUserSelectListData()}" var="selectBo">
                                                <option value="${selectBo.value}" ${selectBo.value eq searchCondMap['QF__EQ__createBy']?'selected':''}>${selectBo.text}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <div class="col-md-1">
                                        <select name="QF__EQ__module" class="selectpicker" data-style="select-with-transition" data-live-search="true">
                                            <option value="">选择模块</option>
                                            <c:forEach var="solrModule" items="${fns:getSolrModuleList()}">
                                                <option value="${solrModule.key}" ${solrModule.key eq searchCondMap['QF__EQ__module']?'selected':''}>${solrModule.desc}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <div class="col-md-2">
                                        <input type="text" id="keyword" name="QF__EQ__keyword" value="${searchCondMap['QF__EQ__keyword']}" class="form-control clearable" placeholder="关键词"/>
                                    </div>
                                    <div class="col-md-1">
                                        <button type="submit" class="btn btn-twitter"><i class="fa fa-search"></i></button>
                                        <input type="hidden" id="pageNo" name="pageNo"/>
                                        <input type="hidden" id="pageSize" name="pageSize" />
                                        <input type="hidden" id="orderBy" name="page.orderBy" value="${orderBean.orderBy}"/>
                                        <input type="hidden" id="order" name="page.order" value="${orderBean.order}"/>
                                    </div>
                                </form>
                            </div>
                        </div>

                        <div class="card-content">
                           <a href="/adminConsole/searchOptimize/pageList" class="btn btn-success btn-sm">返回</a>&nbsp;
                           <tag:paging-simple page="${pageResult}"/>
                           <div class="table-responsive">
                                <table id="datatables" class="table table-bordered table-hover" cellspacing="0" width="100%" style="width:100%">
                                    <thead>
                                        <tr>
                                            <th>模块</th>
                                            <th>关键词</th>
                                            <th>记录ID</th>
                                            <th>记录名称</th>
                                            <th>排序</th>
                                            <th>优化人</th>
                                            <th>优化时间</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <c:set var="topCss" value="${fn:split('danger,rose,warning,info,primary', ',')}"/>
                                    <c:forEach items="${pageResult.result }" var="data">
                                        <tr>
                                            <td>${fns:getSolrModuleDesc(data.module)}</td>
                                            <td><a href="javascript:void(0);" onclick="FormUtil.linkInputSearch('#keyword', '${data.keyword}')">${data.keyword}</td>
                                            <td>${data.docId}</td>
                                            <td>${data.docName}</td>
                                            <td>
                                                <label class="label label-${topCss[data.top-1]}">${data.top}</label>
                                            </td>
                                            <td>${data.createByName}</td>
                                            <td>${fns:formatDateTime(data.createTime)}</td>
                                        </tr>
                                    </c:forEach>
                                    </tbody>
                                </table>
                           </div>
                           <tag:paging page="${pageResult}"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<%@include file="/include/sidebarRight.jsp" %>
</body>
<%@include file="/include/scriptLib.jsp" %>
<script type="text/javascript">

    $(document).ready(function() {

    });

</script>

</html>